﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="InternationalTournaments.aspx.cs"
 Theme="SkinFile" Inherits="Nivdal.InternationalTournaments" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="basic_element">
    <div class="red_title">
        <asp:Label Id="WorldCupTitleLabel" runat="server" CssClass="white_title" Text="<%$ Resources:Resource, NationalTeam_WorldCupTitle %>"></asp:Label>
    </div>
    <div class="padding5">
        <asp:Label ID="OngoingTournamentsLabel" runat="server" Text="<%$ Resources:Resource, AllTournaments_OngoingTournaments %>" SkinID="InfoLabel"></asp:Label>
        <br />
        <asp:GridView ID="OngoingtTournamentsGridview" runat="server" SkinID="Professional" AutoGenerateColumns="false" 
         DataSourceID="OngoingTournamentsDataSource" AllowPaging="false">
            <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, CreateTournament_TournamentNameTitle %>">
                <ItemTemplate>
                    <asp:HyperLink ID="TournamentLink" runat="server" Text='<%# Eval("Name") %>' SkinID="BlackHyperLinkSkin"
                     NavigateUrl='<%# "~/Tournament.aspx?Id=" + Eval("Id") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>        
            </Columns>
            <EmptyDataTemplate>
                <asp:Label ID="NoTournamentsLabel" runat="server" Text="<%$ Resources:Resource, AllTournaments_NoTournaments %>" SkinID="GridLabel"></asp:Label>
            </EmptyDataTemplate>
        </asp:GridView>
        <br /><hr /><br />
        <asp:Label ID="CompletedTouenametsTitleLabel" runat="server" Text="<%$ Resources:Resource, AllTournaments_CompletedTournaments %>" SkinID="InfoLabel"></asp:Label>
        <br />
        <asp:GridView ID="CompletedTournamentsGridview" runat="server" SkinID="Professional" AutoGenerateColumns="false" 
         DataSourceID="CompletedTournamentsDataSource" AllowPaging="false">
            <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, CreateTournament_TournamentNameTitle %>">
                <ItemTemplate>
                    <asp:HyperLink ID="TournamentLink" runat="server" Text='<%# Eval("Name") %>' SkinID="BlackHyperLinkSkin"
                     NavigateUrl='<%# "~/Tournament.aspx?Id=" + Eval("Id") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Winner %>">
                <ItemTemplate>
                    <asp:HyperLink ID="WinnerLink" runat="server" Text='<%# Eval("WinnerName")%>' SkinId="GreenTitleHyperLink"
                    NavigateUrl='<%# "~/NationalTeam.aspx?Id=" + Eval("WinnerId") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    </div>
    <asp:SqlDataSource ID="CompletedTournamentsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetInternationalTournaments" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter Name="Status" DefaultValue="3" DbType="Decimal" />

        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="OngoingTournamentsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetInternationalTournaments" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter Name="Status" DefaultValue="1" DbType="Decimal" />

        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
</asp:Content>
